package com.luocc.inputdemo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.EditText
import com.luocc.inputdemo.watcher.Watcher1
import com.luocc.inputdemo.watcher.Watcher2

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val input1 = findViewById<EditText>(R.id.input1)
        input1.addTextChangedListener(Watcher1(input1, 8, TAG))

        val input2 = findViewById<EditText>(R.id.input2)
        input2.addTextChangedListener(Watcher2(input2, 19, TAG))
    }

    companion object {
        const val TAG = "MainActivity"
    }
}